package io.wdb.modules.generator.generator.controller.api;

import java.io.IOException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import io.wdb.handler.WechatMessageHandler;
import io.wdb.modules.generator.generator.entity.web.BaseResponse;

@Controller
public class TestController extends BaseController{
	
	@Autowired
	private WechatMessageHandler wechatMessageHandler;
	
	@RequestMapping("/test")
	public BaseResponse testOne() {
		BaseResponse baseResponse = success();
		try {
			wechatMessageHandler.getUserList();
		} catch (IOException e) {
			baseResponse = failed(e);
			e.printStackTrace();
		}
		return baseResponse;
	}
}
